<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
	CodeFile="ImportExcel.aspx.cs" Inherits="Import" Title="Untitled Page" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register Namespace="NS_Controls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderContent" runat="Server">
	<asp:UpdatePanel ID="up1" runat="server">
		<ContentTemplate>
			<table>
				<tr>
					<td valign="top" nowrap="nowrap">
						<asp:Label ID="lblMessage" runat="server" Visible="false" ForeColor="Red" />
					</td>
				</tr>
				<tr>
					<div>
						<asp:Panel ID="pnlButton" runat="server" CssClass="context" Style="display: block;"
							Width="1040px" Visible="true" BorderWidth="1px">
							<asp:Button ID="btnUploadModal" runat="server" Text="Upload Excel" BorderWidth="0" />
							<%--<asp:Button ID="btnPreview" runat="server" Text="Preview Data" BorderWidth="0" />--%>
							<asp:Button ID="btnImport" runat="server" Text="Import Excel" BorderWidth="0" />
							<asp:Button ID="btnExportXML" runat="server" Text="Export XML" BorderWidth="0" OnClientClick="OpenXML();"/>
						</asp:Panel>
					</div>
				</tr>
				<tr>
					<td align="center">
						<fieldset border="3px inset" style="padding: 2px 2px 2px 2px;">
							<div style="width: 1035px;">
								<%--<iframe id="xapFrame" width="500" height="410" frameborder="0" scrolling="no" src="../Xap/VideoPlayer.html">
															</iframe>--%>
								<asp:GridView runat="server" ID="extGrTest" PageSize="10" AutoGenerateColumns="true"
									EnableFilter="true" EnablePageSize="true" EnableExport="true">
								</asp:GridView>
							</div>
						</fieldset>
					</td>
				</tr>
			</table>
		</ContentTemplate>
	</asp:UpdatePanel>
	<asp:UpdatePanel ID="UpdatePanel1" runat="server">
		<ContentTemplate>
			<asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Style="display: none;"
				Width="700px" Visible="false">
				<asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
				<ajaxToolKit:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="btnShowPopup"
					PopupControlID="pnlPopup" BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnDragHandleSelection1">
				</ajaxToolKit:ModalPopupExtender>
				<asp:Table runat="server" ID="tblTitle1" Style="background-color: #11DDDD; border: solid 1px Gray;
					width: 700px">
					<asp:TableRow>
						<asp:TableCell Width="100%" HorizontalAlign="Center">
							<asp:Panel ID="pnDragHandleSelection1" runat="server" CssClass="collapsePanelHeader"
								Style="cursor: hand;">
								<div style="float: center; color: White">
									Upload Excel</div>
							</asp:Panel>
						</asp:TableCell>
						<%--<asp:TableCell>
							<asp:Image ID="CancelButton1" AccessKey="c" runat="server" ImageUrl="~/Images/Tools/gr_del_line.jpg"
								Style="cursor: pointer" title="<%$ Resources:DatabaseStrings, Close %>" />
						</asp:TableCell>--%>
					</asp:TableRow>
				</asp:Table>
				<br />
				<fieldset border="3px inset" style="padding: 2px 2px 2px 2px;">
					<div style="width: 690px;">
						<table border="0" cellpadding="3" cellspacing="0">
							<tr>
								<td valign="top" nowrap="nowrap">
									<asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:DatabaseStrings, PathFileServer%>" />:
								</td>
								<td>
									<asp:TextBox ID="txtFileName" runat="server" ReadOnly="true" Width="400"></asp:TextBox>
								</td>
							</tr>
							<tr>
								<td valign="top" nowrap="nowrap">
									<asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:DatabaseStrings, SheetNo%>" />:
								</td>
								<td>
									<asp:TextBox ID="txtSheet" runat="server" Width="100px" />
									<ajaxToolKit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1_txtID" runat="server"
										TargetControlID="txtSheet" ValidChars="0123456789">
									</ajaxToolKit:FilteredTextBoxExtender>
								</td>
							</tr>
							<tr>
								<td valign="top" nowrap="nowrap">
									<asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:DatabaseStrings, LeftCorner%>" />:
								</td>
								<td>
									<asp:TextBox ID="txtLeftCorner" runat="server" Width="100px" />
								</td>
							</tr>
							<tr>
								<td valign="top" nowrap="nowrap">
									<asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:DatabaseStrings, RightCorner%>" />:
								</td>
								<td>
									<asp:TextBox ID="txtRightCorner" runat="server" Width="100px" />
								</td>
							</tr>
							<tr>
								<td valign="top" nowrap="nowrap">
									<asp:Literal ID="Literal1" runat="server" Text="Nume Tabel" />:
								</td>
								<td>
									<asp:TextBox ID="txtTable" runat="server" Width="100px" />
								</td>
							</tr>
						</table>
					</div>
				</fieldset>
				<div align="center">
					<asp:Button ID="btnClose" runat="server" Text="<%$ Resources:DatabaseStrings, Close %>"
						BorderWidth="0" OnClick="btnClose_Click" />
					<asp:Button ID="btnUpload" runat="server" Text="" UseSubmitBehavior="false" Style="display: none"
						OnClick="btnUpload_Click" />
					<asp:Button ID="btnUploadFile" runat="server" Text="<%$ Resources:DatabaseStrings, UploadExcel %>"
						OnClientClick="ShowUploadPageTable();" BorderWidth="0" />
					<asp:Button ID="btnGenerateTable" runat="server" Text="Genereaza grid" OnClick="GenerateTable"
						BorderWidth="0" />
				</div>
			</asp:Panel>
		</ContentTemplate>
	</asp:UpdatePanel>

	<script language="javascript" type="text/javascript">

		var g_str_btnUpload = '<% =btnUpload.ClientID %>';

		function ShowUploadPageTable() {
			var strArgs = 'width=490,height=310,left=400, top=200, toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0';
			var objUploadsWindow = window.open('<% =this.Page.Request.ApplicationPath %>/Tools/UploadX.aspx?s=sms', "_blank", strArgs);
		}

		function OpenXML() 
		{
			window.open("../Tools/ExportXML.ashx", "_blank");
		}
	</script>

</asp:Content>
